const initialState = {
    count:1
  }
  
 export default function reducer(state = initialState, action) {
    switch(action.type) {
      case 'increment':
           return {...state, count:state.count + action.payload}; 
           break;
      case 'decrement': return {...state, count:state.count - 1}; 
            break;
      default : return state
    }
    return state;
  }